<?php
namespace app\shop\controller;
use x\Container;
class Goodscat extends Base
{
    //获取子分类
    public function getsub(){
        if(is_post()){
            $d = $this->post;
            $rs = $this->db->query('select id,cat_title from goods_cat where parent_id=?',[$d['pid']]);
            $rs = array_column($rs,'cat_title','id');
            suc($rs);
        }
    }
}
?>
